<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<link href="/css/layui.mobile.css" rel="stylesheet">
<style>
    .layui-table-edit{
        border: 5px solid;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${apply.id}" type="hidden">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">采购时间：</label>
                            <div class="col-sm-4">
                                <input type="text" class="laydate-icon layer-date form-control" id="purTime" name="purTime" placeholder="采购时间"
                                       th:value="${#dates.format(apply.purTime, 'yyyy-MM-dd')}"
                                       onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"
                                       style="background-color: #fff;" readonly="readonly"/>
                            </div>
                            <label class="col-sm-2 control-label">所属项目：</label>
                            <div class="col-sm-4">
                                <select data-placeholder="所属项目" id="projectId" name="projectId" class="form-control chosen-select" tabindex="2" required>
                                    <option value="">所属项目</option>
                                    <option th:each="projectDO : ${projectDOList}" th:value="${projectDO.id}" th:text="${projectDO.itmNumber}"
                                            th:selected="${projectDO.id} == ${apply.projectId}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">要求到货时间：</label>
                            <div class="col-sm-4">
                                <input type="text" class="laydate-icon layer-date form-control" id="arrivalsTime" name="arrivalsTime" placeholder="要求到货时间"
                                       th:value="${#dates.format(apply.arrivalsTime, 'yyyy-MM-dd')}"
                                       onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"
                                       style="background-color: #fff;" readonly="readonly"/>
                            </div>
                            <label class="col-sm-2 control-label">收货人：</label>
                            <div class="col-sm-4">
                                <input id="receiver" name="receiver" class="form-control"  th:value="${apply.receiver}"  type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">联系方式：</label>
                            <div class="col-sm-4">
                                <input id="receTel" name="receTel" class="form-control"  th:value="${apply.receTel}"  type="text">
                            </div>
                            <label class="col-sm-2 control-label">到货地点：</label>
                            <div class="col-sm-4">
                                <input id="arrivaleAddress" name="arrivaleAddress"  th:value="${apply.arrivaleAddress}"  class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">采购内容：</label>
                            <div class="col-sm-10">
                                <textarea id="purDescr" name="purDescr" class="form-control" type="text" th:text="${apply.purDescr}"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">说明理由：</label>
                            <div class="col-sm-10">
                                <textarea id="reason" name="reason" class="form-control" type="text" th:text="${apply.reason}"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">其他要求备注：</label>
                            <div class="col-sm-10">
                                <textarea id="remark" name="remark" class="form-control" type="text" th:text="${apply.remark}"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">采购清单：</label>
                            <div class="col-sm-10">
                                <input id="purlistfile" name="purlistfile" class="form-control" th:value="${apply.purlistfile}" type="hidden">
                                <button type="button" id="upLoad" class="layui-btn"><i class="fa fa-cloud"></i>上传文件
                                </button>
                                <label id="filename" th:text="${apply.purlistfile}"></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-12 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="/js/layui.js"></script>
<script type="text/javascript" src="/js/appjs/pur/apply/edit.js"></script>
<script type="text/javascript" src="/js/plugins/cropper/cropper.min.js"></script>
<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" src="/js/plugins/distpicker/distpicker.data.min.js"></script>
<script type="text/javascript" src="/js/plugins/distpicker/distpicker.min.js"></script>
</body>
</html>
